from flask import Flask
from flask_cors import CORS

from api.api import api_bp

app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
CORS(app)
# 如果需要执行一些初始化操作，可以在manage.py中进行
app.register_blueprint(api_bp)


if __name__ == '__main__':

    # 启动Flask应用，禁用自动重载
    app.run(host='0.0.0.0', port=5000, debug=False, use_reloader=False)
    #app.run(ssl_context=('cert.pem', 'key.pem'), host='0.0.0.0', port=443)